I want to quote the string ===>11" x 17"<=== inside of double quotes. |
Re: How To Express 11" x 17" print "\"11\" x 17\"\""
|
Re: How To Express 11" x 17" Tony_Goodman - Thu Aug 18 10:04:04 EDT 2011 print "\"11\" x 17\"\""
===>"'11' x 17'""<=== is not available for the printer. (I'm using the arrows so you know exactly what I want and what I see in the error popup.) What I want is ===>11" x 17"<=== Thanks |
Re: How To Express 11" x 17" tlwtheq - Thu Aug 18 10:13:03 EDT 2011 |
Re: How To Express 11" x 17" tlwtheq - Thu Aug 18 10:13:43 EDT 2011
If you declare a string in DXL it must be contained in double quotes string s = "hello"
string s = "11\" x 17\""
|
Re: How To Express 11" x 17" Tony_Goodman - Thu Aug 18 11:01:10 EDT 2011
If you declare a string in DXL it must be contained in double quotes string s = "hello"
string s = "11\" x 17\""
Error popup message says no available printer, where msg string is ===>'11" x 17'"<=== |
Re: How To Express 11" x 17" tlwtheq - Thu Aug 18 11:07:17 EDT 2011 What is the script doing? Is it comparing the string you provide with a string it is getting from elsewhere? If so then the problem may be that the characters in the string are different from the ones you are providing. Can you print out ascii codes of the string you are trying to recreate as follows:
string s = "11\" x 17\""
for (i=0;i<length(s);i++)
{
print((int intOf(s[i])) " ")
}
|
Re: How To Express 11" x 17" Tony_Goodman - Fri Aug 19 07:35:47 EDT 2011 What is the script doing? Is it comparing the string you provide with a string it is getting from elsewhere? If so then the problem may be that the characters in the string are different from the ones you are providing. Can you print out ascii codes of the string you are trying to recreate as follows:
string s = "11\" x 17\""
for (i=0;i<length(s);i++)
{
print((int intOf(s[i])) " ")
}
Export to Excel. In the script, you can pick the size of paper. The original author didn't include 11x17. And actually all I'm doing is adding the string ===>11" x 17"<====, to an array of strings representing paper size. As you know, the MS printer application sees the name of the paper size as, precisely, ===>11" x 17"<===. That's why I think the translate (if you will) isn't working when I look at the error popup and it's got extra double quotes and/or single quotes. Here's what I'm trying to modify: // Paper Sizes able to be stored in a DOORS Page Setup const string DOORS_PAGE_SETUP_PAPER_SIZES[] = { "A4", "A3", "A5", "Legal", "Letter", *"11\" x 17\""*} That string gets passed along to the print utility. |
Re: How To Express 11" x 17" tlwtheq - Fri Aug 19 10:31:38 EDT 2011 What I'm adding is "11\" x 17\"" |
Re: How To Express 11" x 17" tlwtheq - Fri Aug 19 10:32:47 EDT 2011
|
Re: How To Express 11" x 17" llandale - Fri Aug 19 15:50:24 EDT 2011
Have a good weekend, Bro. |
Re: How To Express 11" x 17" tlwtheq - Fri Aug 19 16:35:35 EDT 2011 I wonder if you've looked at your printer properties. I wonder if the code has a hard-coded size for DOORS_PAGE_SETUP_PAPER_SIZES, thus ignoring the last entry. Perhaps move you entry further left. Maybe post that code.
|
Re: How To Express 11" x 17" llandale - Mon Aug 22 13:51:34 EDT 2011
Code: // Paper Sizes able to be stored in a DOORS Page Setup const string DOORS_PAGE_SETUP_PAPER_SIZES[] = { "A4", "A3", "A5", "Legal", "Letter", "11\" x 17\""} const string DOORS_PAGE_SETUP_PAPER_WIDTHS_MM[] = { "210", "297", "148", "216", "216", "216" } const string DOORS_PAGE_SETUP_PAPER_HEIGHTS_MM[] = { "296", "420", "210", "356", "279", "279" } const int DOORS_PAPER_SIZE_A4 = 0 const int DOORS_PAPER_SIZE_A3 = 1 const int DOORS_PAPER_SIZE_A5 = 2 const int DOORS_PAPER_SIZE_LEGAL = 3 const int DOORS_PAPER_SIZE_LETTER = 4 const int DOORS_PAPER_SIZE_11x17 = 5 ..... if ( paperSize == xlPaperA4 ) { paperSizeIndex = DOORS_PAPER_SIZE_A4 } if ( paperSize == xlPaperA3 ) { paperSizeIndex = DOORS_PAPER_SIZE_A3 } if ( paperSize == xlPaperA5 ) { paperSizeIndex = DOORS_PAPER_SIZE_A5 } if ( paperSize == xlPaperLegal ) { paperSizeIndex = DOORS_PAPER_SIZE_LEGAL } if ( paperSize == xlPaperLetter ) { paperSizeIndex = DOORS_PAPER_SIZE_LETTER } if ( paperSize == xlPaper11x17 ) { paperSizeIndex = DOORS_PAPER_SIZE_11x17 } |
Re: How To Express 11" x 17" tlwtheq - Mon Aug 22 14:03:35 EDT 2011 // Paper Sizes able to be stored in a DOORS Page Setup const string DOORS_PAGE_SETUP_PAPER_SIZES[] = { "A4", "A3", "A5", "Legal", "Letter", "11\" x 17\""} const string DOORS_PAGE_SETUP_PAPER_WIDTHS_MM[] = { "210", "297", "148", "216", "216", "216" } const string DOORS_PAGE_SETUP_PAPER_HEIGHTS_MM[] = { "296", "420", "210", "356", "279", "279" } const int DOORS_PAPER_SIZE_A4 = 0 const int DOORS_PAPER_SIZE_A3 = 1 const int DOORS_PAPER_SIZE_A5 = 2 const int DOORS_PAPER_SIZE_LEGAL = 3 const int DOORS_PAPER_SIZE_LETTER = 4 const int DOORS_PAPER_SIZE_11x17 = 5 ..... if ( paperSize == xlPaperA4 ) { paperSizeIndex = DOORS_PAPER_SIZE_A4 } if ( paperSize == xlPaperA3 ) { paperSizeIndex = DOORS_PAPER_SIZE_A3 } if ( paperSize == xlPaperA5 ) { paperSizeIndex = DOORS_PAPER_SIZE_A5 } if ( paperSize == xlPaperLegal ) { paperSizeIndex = DOORS_PAPER_SIZE_LEGAL } if ( paperSize == xlPaperLetter ) { paperSizeIndex = DOORS_PAPER_SIZE_LETTER } if ( paperSize == xlPaper11x17 ) { paperSizeIndex = DOORS_PAPER_SIZE_11x17 } Should not the last entry for variable DOORS_PAGE_SETUP_PAPER_HEIGHTS_MM be 17"x25.36mm/inc = 431? |
Re: How To Express 11" x 17" llandale - Mon Aug 22 14:16:15 EDT 2011 DOORS_PAGE_SETUP_PAPER_HEIGHTS_MM entries by using an inches to millimeter converter tool. |
Re: How To Express 11" x 17" tlwtheq - Mon Aug 22 14:19:56 EDT 2011
const string DOORS_PAGE_SETUP_PAPER_SIZES[] = { "A4", "A3", "A5","Legal","Letter","11\" x 17\""}
const string DOORS_PAGE_SETUP_PAPER_WIDTHS_MM[] = { "210", "297", "148", "216", "216", "216" }
const string DOORS_PAGE_SETUP_PAPER_HEIGHTS_MM[] = { "296", "420", "210", "356", "279", "279" }
const string DOORS_PAGE_SETUP_PAPER_WIDTHS_MM[] = { "210", "297", "148", "216", "216", "279" }
const string DOORS_PAGE_SETUP_PAPER_HEIGHTS_MM[] = { "296", "420", "210", "356", "279", "431" }
|
Re: How To Express 11" x 17" llandale - Mon Aug 22 14:26:42 EDT 2011
const string DOORS_PAGE_SETUP_PAPER_SIZES[] = { "A4", "A3", "A5","Legal","Letter","11\" x 17\""}
const string DOORS_PAGE_SETUP_PAPER_WIDTHS_MM[] = { "210", "297", "148", "216", "216", "216" }
const string DOORS_PAGE_SETUP_PAPER_HEIGHTS_MM[] = { "296", "420", "210", "356", "279", "279" }
const string DOORS_PAGE_SETUP_PAPER_WIDTHS_MM[] = { "210", "297", "148", "216", "216", "279" }
const string DOORS_PAGE_SETUP_PAPER_HEIGHTS_MM[] = { "296", "420", "210", "356", "279", "431" }
It's the 11 x 17 character string that causes the problem. Thanks anyway. |